import matplotlib.pyplot as plt

# 柱形图
categories = ['cucumber', 'potato', 'luffa', 'marrow', 'garlic']
values = [10, 15, 7, 12, 9]
plt.bar(categories, values)
plt.title('bar')
plt.xlabel('x')
plt.ylabel('y')

# 显示图表
plt.show()